package com.billow.book.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.billow.book.mapper.UserMapper;
import com.billow.book.model.User;
import com.billow.book.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public User selectByName(String name) {
        return this.lambdaQuery()
                .eq(User::getUsername, name)
                .one();
    }
}